﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;

namespace Topcoder
{
    namespace SRM531
    {
        class UnsortedSequence
        {
            public static int[] getUnsorted(int[] s)
            {
                List<int> ls = new List<int>(s);
                ls.Sort();
                s = ls.ToArray();
                int i = 0;
                for (i = s.Length - 1; i > 0; i--)
                {
                    if (s[i] != s[i - 1])
                    {
                        int tmp = s[i];
                        s[i] = s[i - 1];
                        s[i - 1] = tmp;
                        break;
                    }
                }
                if (i == 0) return new int[] {};
                else return s;
            }
        }
    }
}
